package com.example.startscreen;

import com.google.android.maps.GeoPoint;

public class MapLocation {
	public int locID;	// location ID
	public int catID;	// category ID
	public int cityID;	// city of geo location
	public String ime;	// name of the location MNE
	public String name;	// name of the location ENG
	public GeoPoint point;	// geo point of the location
	public String latlongpair;	// "latitude,longitude", like "42.658581,19.624672"
	public String description;

	public MapLocation(int locID, int catID, int cityID, String ime, String name, String latlongpair, String description) {
		this.locID = locID;
		this.catID = catID;
		this.cityID = cityID;
		this.ime = ime;
		this.name = name;
		this.latlongpair = latlongpair;
		this.description = description;
		double lat = Double.parseDouble(latlongpair.split(",")[0]);
		double lng = Double.parseDouble(latlongpair.split(",")[1]);
		point = new GeoPoint((int) (lat * 1E6),(int) (lng * 1E6));
	}
}
